package com.css.fxfzysx.modules.ysxManagement.controller;

import com.css.fxfzysx.base.response.RestResponse;
import com.css.fxfzysx.modules.ysxManagement.entity.BdFactorEntity;
import com.css.fxfzysx.modules.ysxManagement.service.BdFactorService;
import com.css.fxfzysx.modules.ysxManagement.vo.BdFactorVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 桥梁计算参数值维护
 */
@RestController
@RequestMapping("bdFactor")
public class BdFactorController {

    @Autowired
    private BdFactorService bdFactorService;

    /**
     * 桥梁震害因子量化取值表增加或修改
     * @param bdFactorEntityList
     * @return
     */
    @PostMapping("saveOrUpdateBdFactor")
    public RestResponse saveOrUpdateBdFactor(@RequestBody List<BdFactorEntity> bdFactorEntityList){
        return bdFactorService.saveOrUpdateBdFactor(bdFactorEntityList);
    }

    /**
     * 桥梁震害因子量化取值表查询
     * @param
     * @return
     */
    @GetMapping("getAllBdFactor")
    public RestResponse getAllBdFactor(){
        return bdFactorService.getAllBdFactor();
    }

    /**
     * 桥梁震害因子量化取值表删除
     * @param bdFactorIds
     * @return
     */
    @GetMapping("deleteBdFactorById")
    public RestResponse deleteBdFactorById(String bdFactorIds){
        return bdFactorService.deleteBdFactorById(bdFactorIds);
    }
}
